package com.study.aop.theory.service.impl;

import com.study.aop.theory.service.SpaService;
import org.springframework.stereotype.Service;

import java.util.Random;
import java.util.concurrent.TimeUnit;

/**
 * @author: chenhs
 * @date: Created in 15:21 2019/12/8
 **/
@Service
public class SpaPrincessA implements SpaService {


    private Random random = new Random();

    private int bound = 5;

    @Override
    public void fullBodyMessage(String customer) {
        try {
            TimeUnit.SECONDS.sleep(random.nextInt(bound));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        System.out.println(customer + "享受完fullBodyMessage服务！");
    }

    @Override
    public void aromaOilMassage(String customer) {
        try {
            TimeUnit.SECONDS.sleep(random.nextInt(bound));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        System.out.println(customer + "享受完aromaOilMassage服务！");
    }
}
